package java3_7;

import java.util.Scanner;

/**
 * 12：定义一个整数数组，输出比平均值大的数
 */
public class homework12 {
    public static void main(String[] args) {
        double sum = 0;
        double avg = 0;
        Scanner scanner = new Scanner(System.in);
        double [] a = new double[8];
        for (int i = 0; i < a.length; i++) {
            a[i] = scanner.nextInt();
            sum = sum+a[i];
        }
        avg = sum/8;
        System.out.println("平均值是："+avg);
        for (int i = 0; i < a.length; i++) {
            if (a[i]>avg){
                System.out.print(a[i]+" ");
                continue;
            }
        }
    }
}
